package com.example.demo.controller;

import com.example.demo.dto.ResponseResult;
import com.example.demo.service.GuideService;
import com.example.demo.service.impl.GuideServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/app/guide")
public class GuideController {

    private final GuideService guideService;

    @Autowired
    public GuideController(GuideServiceImpl guideServiceImpl) {
        this.guideService = guideServiceImpl;
    }

    @GetMapping("/get/detail")
    public ResponseResult<Map<String, Object>> getGuideDetail(@RequestParam(defaultValue = "1") Long guideId) {
        Map<String, Object> data = guideService.getGuideDetail(guideId);
        return new ResponseResult<>(200,"响应成功！",data);
    }
}
